Optimal. Leaf size=104 \[ \frac{\tan (e+f x) (a \sec (e+f x)+a)^{m+1} (c-c \sec (e+f x))^{-m-2}}{a f \left (4 m^2+8 m+3\right )}-\frac{\tan (e+f x) (a \sec (e+f x)+a)^m (c-c \sec (e+f x))^{-m-2}}{f (2 m+1)} \]
[Out]
________________________________________________________________________________________
Rubi [A] time = 0.224782, antiderivative size = 104, normalized size of antiderivative = 1., number of steps used = 2, number of rules used = 2, integrand size = 36, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.056, Rules used = {3951, 3950} \[ \frac{\tan (e+f x) (a \sec (e+f x)+a)^{m+1} (c-c \sec (e+f x))^{-m-2}}{a f \left (4 m^2+8 m+3\right )}-\frac{\tan (e+f x) (a \sec (e+f x)+a)^m (c-c \sec (e+f x))^{-m-2}}{f (2 m+1)} \]
Antiderivative was successfully verified.
[In]
[Out]
Rule 3951
Rule 3950
Rubi steps
\begin{align*} \int \sec (e+f x) (a+a \sec (e+f x))^m (c-c \sec (e+f x))^{-2-m} \, dx &=-\frac{(a+a \sec (e+f x))^m (c-c \sec (e+f x))^{-2-m} \tan (e+f x)}{f (1+2 m)}-\frac{\int \sec (e+f x) (a+a \sec (e+f x))^{1+m} (c-c \sec (e+f x))^{-2-m} \, dx}{a (1+2 m)}\\ &=-\frac{(a+a \sec (e+f x))^m (c-c \sec (e+f x))^{-2-m} \tan (e+f x)}{f (1+2 m)}+\frac{(a+a \sec (e+f x))^{1+m} (c-c \sec (e+f x))^{-2-m} \tan (e+f x)}{a f \left (3+8 m+4 m^2\right )}\\ \end{align*}
Mathematica [C] time = 3.14231, size = 250, normalized size = 2.4 \[ \frac{i 2^{m+3} \left (1+e^{i (e+f x)}\right ) \left (-i e^{-\frac{1}{2} i (e+f x)} \left (-1+e^{i (e+f x)}\right )\right )^{-2 m} \left (\frac{e^{i (e+f x)}}{1+e^{2 i (e+f x)}}\right )^{-m} \left (\frac{\left (1+e^{i (e+f x)}\right )^2}{1+e^{2 i (e+f x)}}\right )^m \left ((m+1) e^{2 i (e+f x)}-e^{i (e+f x)}+m+1\right ) \sin ^{2 (m+2)}\left (\frac{1}{2} (e+f x)\right ) \sec ^{m+2}(e+f x) (\sec (e+f x)+1)^{-m} (a (\sec (e+f x)+1))^m (c-c \sec (e+f x))^{-m-2}}{f (2 m+1) (2 m+3) \left (-1+e^{i (e+f x)}\right )^3} \]
Warning: Unable to verify antiderivative.
[In]
[Out]
________________________________________________________________________________________
Maple [F] time = 0.668, size = 0, normalized size = 0. \begin{align*} \int \sec \left ( fx+e \right ) \left ( a+a\sec \left ( fx+e \right ) \right ) ^{m} \left ( c-c\sec \left ( fx+e \right ) \right ) ^{-2-m}\, dx \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [A] time = 1.5165, size = 144, normalized size = 1.38 \begin{align*} -\frac{{\left (\left (-a\right )^{m}{\left (2 \, m + 1\right )} - \frac{\left (-a\right )^{m}{\left (2 \, m + 3\right )} \sin \left (f x + e\right )^{2}}{{\left (\cos \left (f x + e\right ) + 1\right )}^{2}}\right )} c^{-m - 2}{\left (\cos \left (f x + e\right ) + 1\right )}^{3}}{2 \,{\left (4 \, m^{2} + 8 \, m + 3\right )} f \left (\frac{\sin \left (f x + e\right )}{\cos \left (f x + e\right ) + 1}\right )^{2 \, m} \sin \left (f x + e\right )^{3}} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [A] time = 0.50293, size = 227, normalized size = 2.18 \begin{align*} -\frac{{\left (2 \,{\left (m + 1\right )} \cos \left (f x + e\right ) - 1\right )} \left (\frac{a \cos \left (f x + e\right ) + a}{\cos \left (f x + e\right )}\right )^{m} \left (\frac{c \cos \left (f x + e\right ) - c}{\cos \left (f x + e\right )}\right )^{-m - 2} \sin \left (f x + e\right )}{{\left (4 \, f m^{2} + 8 \, f m + 3 \, f\right )} \cos \left (f x + e\right )^{2}} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [F(-1)] time = 0., size = 0, normalized size = 0. \begin{align*} \text{Timed out} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [F] time = 0., size = 0, normalized size = 0. \begin{align*} \int{\left (a \sec \left (f x + e\right ) + a\right )}^{m}{\left (-c \sec \left (f x + e\right ) + c\right )}^{-m - 2} \sec \left (f x + e\right )\,{d x} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]